<template>
  <div>
    <h1>{{ resdata.title}}</h1>
    <article v-html="resdata.content"></article>
  </div>
</template>

<script>
export default {
  mounted() {
    this.getDetail();
  },
  data() {
    return {
      resdata: "",
    };
  },
  methods: {
    getDetail() {
      this.$store.dispatch({
          type: "getDetail",
          id: this.$route.params.id,
        })
        .then((data) => {
          this.resdata = data;
        });
    },
  },
};
</script>